import Base from 'models/base';

const typeArr = ['拼团', '砍价'];

export default class GroupBargainGoods extends Base {
  constructor(goods) {
    super();

    this.defId = goods.goodsDefId;
    this.name = goods.goodsName;
    this.pic = this.getOnePic(goods.goodsPic);
    this.price = goods.activityPrice;
    this.sourcePrice = goods.goodsModelSourcePrice;
    let typeText = goods.type;
    this.type = typeArr.indexOf(typeText);
    this.typeText = typeText;
  }
}
